#  pip install python-docx
from docx import Document
import pandas as pd
import os

def parse_doc_file(doc_file):
    doc = Document(doc_file)
    table = doc.tables[0]
    
    return dict(
        姓名=table.cell(0, 0).text,
        性别=table.cell(0, 1).text,
        年龄=table.cell(0, 2).text,
        
    )
column = None
datas = []
for fname in os.listdir('./'):
    if fname.endswith('.docx'): 
        data = parse_doc_file(fname)
        if not column:
            columns = data.keys()
        
        datas.append([data[column] for column in columns])
pd.DataFrame(datas, columns=columns).to_excel('./后勤部.xlsx') 